# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=step
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
# s390x blocked by khtml
# riscv64 disabled due to missing rust in recursive dependency
arch="all !armhf !s390x !riscv64"
url="https://edu.kde.org/step/"
pkgdesc="Interactive Physics Simulator"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	eigen-dev
	extra-cmake-modules
	kconfig5-dev
	kcrash5-dev
	kdoctools5-dev
	khtml-dev
	kiconthemes5-dev
	knewstuff5-dev
	kplotting5-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	qt5-qttools-dev
	samurai
	shared-mime-info
	"
_repo_url="https://invent.kde.org/education/step.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/step-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
fe4438817e3af5bcef78389646324cca264519cf8f841addce62ed4092898d37f8b3c7cb27a70d4d8d549e27ce6a1a634e69a34228ed1d4c57cf32ded68c46a3  step-23.08.4.tar.xz
"
